A reference is an alias (an alternate name) for an object. It is frequently used for pass-by-reference; ex:
void swap(int& i, int& j)
{
int tmp = i;
i = j;
j = tmp;
}
main()
{
int x, y;
//...
swap(x,y);
}
Here 'i' and 'j' are aliases for main's 'x' and 'y' respectively. The effect is as if you used the C style pass-by-pointer, but the '&' is moved from the caller into the callee. Pascal enthusiasts will recognize this as a VAR param.